package com.liuceng.zen.pojo.domain;

import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.Date;

import lombok.Data;

@Data
public class RptFrontCampaign extends BaseDomain {
  public static final Integer STATUS_RUN = 1;
  public static final Integer STATUS_STOP = 2;


  private Integer id;
  private Integer memberId;
  private String cname;
  private Integer status;
  private Date createdAt;
  private Date updatedAt;
  private Integer pc;
  private Integer pv;
  private BigDecimal cost;
  private Date startAt;
  private Date endAt;
  private String startAtToString;
  private String endAtToString;
  private String clickRate;
  private String avgCost;
  private String avgCostView;
  ///
  private BigDecimal ctr;
  private BigDecimal costPerClick;
  private BigDecimal costPerView;
  private Integer sitesetType;

  public String getStartAtToString() {
    SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss");
    if (this.startAt == null) {
      return "";
    } else {
      return sdf.format(this.startAt);
    }
  }

  public String getEndAtToString() {
    SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss");
    if (this.endAt == null) {
      return "";
    } else {
      return sdf.format(this.endAt);
    }
  }

}
